import 'package:app/pages/contract_module/contract_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../common/app_theme.dart';
import '../../../common/colors.dart';
import '../../../common/tool.dart';
import '../../../components/base_scaffold_appbar.dart';
import 'contract_detail_controller.dart';

class ContractDetailView extends GetView{

  ContractDetailControoler controller = Get.put(ContractDetailControoler());

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      backgroundColor: AppColor.bgColor,
      appBar:BaseAppBar(preferredSize: Size(Get.width, AppTool.appBarHEIGHT),
      child: Text('合同详情'),),
      // AppBar(
      //   backgroundColor: AppColor.themeColor,
      //   title:  Text('详情'),
      //   leading: IconButton(
      //     onPressed: () {
      //       Get.back();
      //     },
      //     icon: Image.asset(
      //       'images/leftarr.png',
      //       color: Colors.white,
      //       width: 15,
      //       height: 15,
      //     ),
      //   ),
      // ),
      body: GetBuilder<ContractDetailControoler>(builder: (_){
        return Container(
          padding: EdgeInsets.all(0),
          child: ListView(
            // crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              SizedBox(height: 15,),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('合同名称',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.name??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('员工名称',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.employeeName??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('开始时间',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.dateStart??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('结束时间',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.dateEnd??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('状态',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.state??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),

              // Container(
              //     height: 40,
              //     color: Colors.white,
              //     alignment: Alignment.centerLeft,
              //     child: Text('是否关注：${controller.model?.data?.isFocus}')),
              // Divider(),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('薪水',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.wage??'0'}元'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('工作安排',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.workTime??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('岗位',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.jobName??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
              Container(
                  padding: EdgeInsets.only(left: 15,right: 15),
                  color: Colors.white,
                  alignment: Alignment.centerLeft,
                  height: 40,
                  child:  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('备注',style: appThemeData.textTheme.subtitle1!.copyWith(fontSize: 15),),
                      Text('${controller.model?.data?.notes??''}'),
                    ],
                  )
              ),
              SizedBox(
                height: 1,
              ),
            ],
          ),
        );
      }),
    );
  }

}